﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QXBook.Utils;

namespace QXBook.Model
{
    public class MembersInfo : IModelBase
    {
        public int MemberID { get; set; }
        /// <summary>
        /// 管理员姓名
        /// </summary>
        public string AdminName { set { this._adminname = value; } get { return this._adminname; } }
        /// <summary>
        /// 管理员昵称
        /// </summary>
        public string NickName { set { this._nickname = value; } get { return this._nickname; } }
        /// <summary>
        /// 管理员密码
        /// </summary>
        public string Password { set { this._password = value; } get { return this._password; } }
        /// <summary>
        /// 管理员分组
        /// </summary>
        public int RoleID { set { this._roleid = value; } get { return this._roleid; } }
        /// <summary>
        /// 管理员分组
        /// </summary>
        public MembersRoleInfo Role { set { this._role = value; } get { return this._role; } }
        /// <summary>
        /// 权限ID字符串
        /// </summary>
        public string PopDomStr { get { return this._popedomstr; } set { this._popedomstr = value; } }
        /// <summary>
        /// 管理员特定权限
        /// </summary>
        public Dictionary<int, PopDomInfo> PopeDomList { set { this._popedomlist = value; } get { return this._popedomlist; } }
        /// <summary>
        /// 是否锁定 ，为Y的时候表示锁定
        /// </summary>
        public YesNo IsLock { set { this._islock = value; } get { return this._islock; } }
        /// <summary>
        /// 是否在线
        /// </summary>
        public YesNo IsOnline { set { this._isonline = value; } get { return this._isonline; } }
        /// <summary>
        /// 是否被删除
        /// </summary>
        public YesNo IsDelete { set { this._isdelete = value; } get { return this._isdelete; } }
        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime AddDate { set { this._adddate = value; } get { return this._adddate; } }
        /// <summary>
        /// 最后一次更新的时间
        /// </summary>
        public DateTime UpdateDate { set { this._updatedate = value; } get { return this._updatedate; } }
        /// <summary>
        /// 最后一次登陆的时间
        /// </summary>
        public DateTime LoginDate { set { this._logindate = value; } get { return this._logindate; } }
        /// <summary>
        /// 最后一次登陆的时间
        /// </summary>
        public DateTime LastLoginDate { set { this._lastlogindate = value; } get { return this._lastlogindate; } }
        /// <summary>
        /// 登陆次数
        /// </summary>
        public int LoginCount { set { this._logincount = value; } get { return this._logincount; } }
        /// <summary>
        /// 最后一次登陆的IP
        /// </summary>
        public string LastLoginIp { set { this._lastloginip = value; } get { return this._lastloginip; } }

        
        private string _lastloginip = "";
        private int _logincount = 0;
        private DateTime _lastlogindate;
        private DateTime _logindate;
        private DateTime _updatedate;
        private DateTime _adddate;

        private Dictionary<int, PopDomInfo> _popedomlist = null;

        private int _roleid = 0;
        private MembersRoleInfo _role = null;
        private string _password = "";
        private string _nickname = "";
        private string _adminname = "";
        private YesNo _isdelete = YesNo.Unknow;
        private YesNo _islock = YesNo.Unknow;
        private YesNo _isonline = YesNo.Unknow;
        private string _popedomstr;

        public int ID
        {
            get { return MemberID; }
        }
    }
}
